package com.ccrfid.rmc6.entity.device;

import com.vividsolutions.jts.geom.Point;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "v_card_active")
public class CardActiveView {
    private Long cardNumber;
    private Integer locatorAddress;
    private Point pos;
    private Integer floorNumber;
    private Timestamp updateTime;

    @Id
    @Column(name = "card_number", nullable = false)
    public Long getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(Long cardNumber) {
        this.cardNumber = cardNumber;
    }

    @Basic
    @Column(name = "locator_address")
    public Integer getLocatorAddress() {
        return locatorAddress;
    }

    public void setLocatorAddress(Integer locatorAddress) {
        this.locatorAddress = locatorAddress;
    }

    @Basic
    @Column(name = "pos")
    @Type(type = "jts_geometry")
    public Point getPos() {
        return pos;
    }

    public void setPos(Point pos) {
        this.pos = pos;
    }

    @Basic
    @Column(name = "floor_number")
    public Integer getFloorNumber() {
        return floorNumber;
    }

    public void setFloorNumber(Integer floorNumber) {
        this.floorNumber = floorNumber;
    }

    @Basic
    @Column(name = "update_time", nullable = false)
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }
}
